exports.data = {
  json: {
    kind: "Snippet",
    body: ['"van-search": "@vant/weapp/search/index"'],
    detail: "Search 搜索",
    documentation: `在app.json或index.json中引入组件`,
  },
  wxml: {
    kind: "Snippet",
    body: ['<van-search value="{{ ${1:value} }}"${2}>${3}</van-search>'],
    detail: "Search 搜索",
    documentation: `用于搜索场景的输入框组件。`,
    attrs: [
      {
        kind: "Field",
        body: ["name="],
        detail: "name",
        documentation: "在表单内提交时的标识符",
        vals: null,
      },
      {
        kind: "Field",
        body: ["label="],
        detail: "label",
        documentation: "搜索框左侧文本",
        vals: null,
      },
      {
        kind: "Field",
        body: ["shape="],
        detail: "shape",
        documentation: "形状，可选值为square round",
        vals: {
          kind: "Value",
          body: ["square", "round"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["value="],
        detail: "value",
        documentation: "当前输入的值",
        vals: null,
      },
      {
        kind: "Field",
        body: ["background="],
        detail: "background",
        documentation: "搜索框背景色",
        vals: null,
      },
      {
        kind: "Field",
        body: ["show-action="],
        detail: "show-action",
        documentation: "是否在搜索框右侧显示取消按钮",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["action-text="],
        detail: "action-text",
        documentation: "取消按钮文字",
        vals: null,
      },
      {
        kind: "Field",
        body: ["focus="],
        detail: "focus",
        documentation: "获取焦点",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["error="],
        detail: "error",
        documentation: "是否将输入内容标红",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["disabled="],
        detail: "disabled",
        documentation: "是否禁用输入框",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["readonly="],
        detail: "readonly",
        documentation: "是否只读",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["clearable="],
        detail: "clearable",
        documentation: "是否启用清除控件",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["clear-trigger="],
        detail: "clear-trigger",
        documentation:
          "显示清除图标的时机，always 表示输入框不为空时展示，focus 表示输入框聚焦且不为空时展示",
        vals: {
          kind: "Value",
          body: ["focus"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["clear-icon="],
        detail: "clear-icon",
        documentation: "清除图标名称或图片链接",
        vals: {
          kind: "Value",
          body: ["clear"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["maxlength="],
        detail: "maxlength",
        documentation: "最大输入长度，设置为 -1 的时候不限制最大长度",
        vals: null,
      },
      {
        kind: "Field",
        body: ["use-action-slot="],
        detail: "use-action-slot",
        documentation: "是否使用 action slot",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["placeholder="],
        detail: "placeholder",
        documentation: "输入框为空时占位符",
        vals: null,
      },
      {
        kind: "Field",
        body: ["placeholder-style="],
        detail: "placeholder-style",
        documentation: "指定占位符的样式",
        vals: null,
      },
      {
        kind: "Field",
        body: ["input-align="],
        detail: "input-align",
        documentation: "输入框内容对齐方式，可选值为left center right",
        vals: {
          kind: "Value",
          body: ["left", "center", "right"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["use-left-icon-slot="],
        detail: "use-left-icon-slot",
        documentation: "是否使用输入框左侧图标 slot",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["use-right-icon-slot="],
        detail: "use-right-icon-slot",
        documentation: "是否使用输入框右侧图标 slot",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["left-icon="],
        detail: "left-icon",
        documentation:
          "输入框左侧图标名称或图片链接，可选值见 Icon 组件（如果设置了 use-left-icon-slot，则该属性无效）",
        vals: {
          kind: "Value",
          body: ["search"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["right-icon="],
        detail: "right-icon",
        documentation:
          "输入框右侧图标名称或图片链接，可选值见 Icon 组件（如果设置了 use-right-icon-slot，则该属性无效）",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:search="],
        detail: "bind:search",
        documentation: "确定搜索时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:change="],
        detail: "bind:change",
        documentation: "输入内容变化时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:cancel="],
        detail: "bind:cancel",
        documentation: "取消搜索搜索时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:focus="],
        detail: "bind:focus",
        documentation: "输入框聚焦时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:blur="],
        detail: "bind:blur",
        documentation: "输入框失焦时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:clear="],
        detail: "bind:clear",
        documentation: "点击清空控件时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:click-input="],
        detail: "bind:click-input",
        documentation: "点击搜索区域时触发",
        vals: null,
      },
      {
        kind: "Field",
        body: ["custom-class="],
        detail: "custom-class",
        documentation: "根节点样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["field-class="],
        detail: "field-class",
        documentation: "搜索框样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["input-class="],
        detail: "input-class",
        documentation: "输入框样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["cancel-class="],
        detail: "cancel-class",
        documentation: "取消按钮样式类",
        vals: null,
      },
    ],
    slot: {
      kind: "Value",
      body: ["action", "label", "left-icon", "right-icon"],
      detail: "Search 搜索 Slot",
      documentation: `
      action	自定义搜索框右侧按钮，需要在use-action-slot为 true 时才会显示
      label	自定义搜索框左侧文本
      left-icon	自定义输入框左侧图标，需要在use-left-icon-slot为 true 时才会显示
      right-icon	自定义输入框右侧图标，需要在use-right-icon-slot为 true 时才会显示
      `,
      vals: null,
    },
  },
};
